//
//  main.m
//  mac
//
//  Created by liuweixing on 2020/1/1.
//  Copyright © 2020 liuweixing. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "TestString.h"
#import "Person.h"
#import "Person+a2.h"
#import "Person+a1.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#import "NSObject+AXSafe.h"
#import "Test_keyPath.h"
#import "TestBasic.h"

#import "test1.h"
#import "test2.h"
#import "test_invoke.h"
#import "test_Sort.h"
#import "test_fmod.h"
#import "test_null.h"
#import "test_url.h"
#import "TestNSPredicate.h"
#import "TestCGRect.h"
#import "TestURL.h"
#import "TestPath.h"
#import "test_grammar.h"
#import "test_sql.h"

// 首部空格一下
// FIXME:修改我

// TODO:设置layout

//  TODO:设置frame

// ???:这是什么？



//!!!!:这里添加内容（三个感叹号不起作用，要四个及以上）

// !!!: 这里添加内容（三个感叹号 要空格）

//!!!:注意？？（这种情况不起作用）


int main(int argc, const char * argv[]) {
    

    
    @autoreleasepool {
        
        
        for (int i = 0; i < 3; i++) {
            for (int j = 0; j < 3; j++) {
                NSLog(@"i = %d,j=%d",i,j);
                if (j == 2) {
                    
//                    goto jumpTo;
                    goto jumpTo2;
                }
            }
        }
        
    jumpTo:NSLog(@"跳到这一行");
        
        
    jumpTo2:{
            NSLog(@"jumpTo2========");
            
        };

        
        
        return 0;
        
        TestString *testString = TestString.alloc.init;
        testString.name = @"good";
        [testString change:testString.name];
        return 0;
        [Person testA:@"jim"];
        
        return 0;
        //        NSString *str = @"AA";
        //        NSLog(@">> %@",str?:@"kong");
        NSArray *arr = @[@"a",@"v"];
        
        return 0;
        test_sql();
        return 0;
        //        UPDATE Person SET FirstName = 'Fred' WHERE LastName = 'Wilson'
        //        UPDATE Person SET FirstName = ? WHERE LastName = ?
        NSDictionary *dict = @{
            @"name1":@"jim_1",
            @"name2":@"jim_2",
        };
        NSMutableArray *values = NSMutableArray.array;
        [dict.allKeys enumerateObjectsUsingBlock:^(NSString*  _Nonnull key, NSUInteger idx, BOOL * _Nonnull stop) {
            [values addObject:[NSString stringWithFormat:@"%@='%@'",key,dict[key]]];
        }];
        NSString *set = [values componentsJoinedByString:@","];
        
        NSDictionary *dict2 = @{
            @"id":@"1",
            @"id2":@"2",
        };
        
        NSMutableArray *whereArr = NSMutableArray.array;
        [dict2.allKeys enumerateObjectsUsingBlock:^(NSString*  _Nonnull key, NSUInteger idx, BOOL * _Nonnull stop) {
            [whereArr addObject:[NSString stringWithFormat:@"%@='%@'",key,dict2[key]]];
        }];
        NSString *where = [whereArr componentsJoinedByString:@" AND "];
        
        NSString *sql = [NSString stringWithFormat:@"UPDATE Person SET %@ WHERE %@",set,where];
        NSLog(@"sql=%@",sql);
        
        //        test_keyPath();
        
        
        //        test_grammar();
        
        //        TestPath();
        //        NSString *str = @"a";
        //        NSString *str2 = @"ab";
        //        NSLog(@"str=%d",[str isEqual:str2]);
        //        NSLog(@"str=%d",str==str2);
        
        //        test_Sort();
        
        //        test_keyPath();
        
        //        test_basic();
        
        //        TestNSPredicate();
        //        test_null();
        
        //        TestCGRect();
        //        TestURL();
        
        //
        //#define AllowTMFH5OfflineReplace 1
        //
        //#ifdef AllowTMFH5OfflineReplace
        //        NSLog(@"AllowTMFH5OfflineReplace");
        //#endif
        //
        //
        //#if AllowTMFH5OfflineReplace==0
        //        NSLog(@"AllowTMFH5OfflineReplace=0");
        //#elif AllowTMFH5OfflineReplace==1
        //        NSLog(@"AllowTMFH5OfflineReplace=1");
        //#endif
    }
    
    return 0;
}
